Skip to content

Conversation

@jsquyres
Copy link
Member

When compiling mpi.h with a modern C++ compiler and a high degree of
pickyness (e.g., -Wold-style-cast), casting using (void*) in the
OMPI_PREDEFINED_GLOBAL and MPI_STATUS*_IGNORE macros will emit
warnings. So if we're compiling with a C++ compiler, use C++'s
static_cast<> instead of (void*).

Thanks to @shadow-fax for identifying the issue.

Signed-off-by: Jeff Squyres [email protected]
(cherry picked from commit 30afdce)

Refs #6316

When compiling mpi.h with a modern C++ compiler and a high degree of
pickyness (e.g., -Wold-style-cast), casting using (void*) in the
OMPI_PREDEFINED_GLOBAL and MPI_STATUS*_IGNORE macros will emit
warnings.  So if we're compiling with a C++ compiler, use C++'s
static_cast<> instead of (void*).

Thanks to @shadow-fax for identifying the issue.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 30afdce)
@bwbarrett bwbarrett merged commit 93eaff2 into open-mpi:v3.0.x Feb 12, 2019
@jsquyres jsquyres deleted the pr/v3.0.x/make-mpi.h-a-little-friendlier-to-c++ branch December 7, 2021 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants